﻿using CSRedis;
using LServer.Model.Managers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LServer.Model
{

    public class LFRedisClient
    {
        private static object lock_obje = new object();

        private static CSRedisClient m_CurrClient;

        public static void InitRedisClient() 
        {
            if (m_CurrClient == null) 
            {
                lock (lock_obje) 
                {
                    if (m_CurrClient == null) 
                    {
                        m_CurrClient = new CSRedisClient(ServerConfig.RedisConnectionString);
                        RedisHelper.Initialization(m_CurrClient);
                    }
                }
            }
        }
    }
}
